Get OCR results from Gyazo Pro via API
code:python
import requests
GYAZO_API_TOKEN = "..."
GYAZO_IMAGE_ID = "bf881c1e44d798978431f9a2af02acdb"
res = requests.get(
f"{GYAZO_API_ROOT}/images/{GYAZO_IMAGE_ID}", headers={
"Authorization": f"Bearer {GYAZO_API_TOKEN}"
}
)
PyPI has python-gyazo, but it is not implemented to get a single image by specifying its ID, and "ocr" in the response is ignored, so you have to do a lot of work to use it for this purpose, and as mentioned above, you can achieve your goal in a few lines, so there was no need to use it. ---
This page is auto-translated from /nishio/Gyazo ProのOCR結果をAPIで取得. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I'm very happy to spread my thought to non-Japanese readers.